body, html {
    font-family: YouYuan;
    font-weight: 1000;
    margin: 0;
    min-height: 210vh;
    background-image: url('../picture/mdbj.jpg'); /* 替换为你的图片路径 */
    background-color: rgb(9, 5, 8); /* 背景颜色作为回退选项 */
    background-size: cover; /* 使背景图片覆盖整个元素 */
    background-position: center; /* 将背景图片放置在元素中心 */
    background-repeat: no-repeat; /* 防止背景图片重复 */
    background-attachment: fixed; /* 滚动时背景图片固定 */
}


.novel {
    width: 80%; /* 设置宽度为父容器宽度的80% */
    height: auto; /* 高度自动调整，根据内容自适应 */
    margin: 20px;
    padding: 20px;
    background: #f9f9f9da;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-left: auto;
    margin-right: auto;
    font-family: YouYuan;
}

.novel-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.novel-cover {
    width: 150px;
    height: 200px;
    margin-right: 20px;
    border-radius: 4px;
}

.novel-meta h1 {
    margin: 0 0 10px;
    font-size: 24px;
}

.novel-meta p {
    margin: 5px 0;
    color: #666;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
}

.chapter-nav li a {
    display: block;
    padding: 8px;
    margin-bottom: 5px;
    background: #eaeaea;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

.chapter-nav li a.active {
    background: #007BFF;
    color: white;
}

.novel-content h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

.novel-content p {
    text-indent: 2em;
    line-height: 1.6;
}

.chapter-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
    justify-content: flex-start; /* 列表项靠左放置 */
}

.chapter-list li {
    margin: 5px; /* 列表项之间的间隔 */
    width: calc(10% - 10px); /* 每个章节链接占据大约10%的宽度减去间隔 */
    text-align: center; /* 文本居中 */
}

.chapter-list li a {
    display: block;
    padding: 8px 12px;
    background: #eaeaea;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

.chapter-list li a.active {
    background: #007BFF;
    color: white;
}

/* 确保在较小屏幕上也能正常显示 */
@media (max-width: 600px) {
    .chapter-list li {
        width: calc(50% - 10px); /* 在小屏幕上，每个章节链接占据大约50%的宽度减去间隔 */
    }
}


.comments {
    margin-top: 30px;
}

.comment-form textarea {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 20px;
    border: 1px solid #ccc;
    font-size: 1em;
}

.submit-comment {
    padding: 8px 15px;
    font-size: 1em;
    color: #fff;
    background-color: #6a82fb;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-comment:hover {
    background-color: #4e66d6;
}

.comments-list {
    margin-top: 20px;
}

.comment {
    margin-bottom: 20px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    float: left;
    margin-right: 15px;
}

.comment-body {
    margin-left: 65px;
}

.comment-username, .comment-id, .comment-time {
    font-size: 0.9em;
    color: #333;
}

.comment-username {
    font-weight: bold;
}

.comment-time {
    opacity: 0.7;
}

.comment-section {
    font-family: Arial, sans-serif;
    margin: 20px;
    padding: 10px;
    border: 1px solid #090909;
}

.comment, .reply {
    margin-bottom: 10px;
    padding: 5px;
    border-left: 3px solid #f108f9;
}

.comment-header, .reply-header {
    font-weight: bold;
    margin-bottom: 5px;
}

.comment-body, .reply-body {
    margin-bottom: 5px;
}

.user-name {
    color: #030303;
}

/* 确保回复的缩进一致，看起来是同一层级的 */
.reply {
    margin-left: 50px; /* 根据需要调整缩进大小 */
}

/* 可以为用户B和用户C的回复添加不同的样式，如果需要 */
.user-b .reply-header {
    color: #0066cc;
}

.user-c .reply-header {
    color: #cc0066;
}

.reply {
    margin-bottom: 10px;
    padding: 5px;

    border-left: 3px solid #0bbde0;
}

.reply-header, .reply-body p {
    margin: 0; /* 移除默认的外边距 */
}

.user-name {
    color: #040303;
    font-weight: bold;
}

.reply-text {
    display: flex; /* 使用Flexbox布局 */
    align-items: flex-start; /* 垂直方向上从顶部开始对齐 */
}

.reply-body p {
    margin-left: 10px; /* 在回复内容和回复者标识之间添加一些间隔 */
}


.dialog {
    height: 40px;
    width: 960px; /* Adjust the width as needed */
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    background-color: #ffffffda;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;


    }
    .send-btn {
        padding: 10px 20px; /* 按钮内边距 */
        font-size: 16px; /* 字体大小 */
        font-weight: bold; /* 字体加粗 */
        color: #ffffff; /* 文字颜色 */
        background-color: #007bff; /* 背景颜色 */
        border: none; /* 无边框 */
        border-radius: 5px; /* 圆角边框 */
        cursor: pointer; /* 鼠标悬停时显示手形图标 */
        transition: background-color 0.3s, transform 0.2s; /* 背景颜色和形状变化的过渡效果 */
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
        outline: none; /* 点击时不显示轮廓 */
    }
    .send-btn:hover {
        background-color: #0056b3; /* 鼠标悬停时的背景颜色 */
    }
    .send-btn:active {
        transform: scale(0.98); /* 点击时缩小按钮 */
    }
    .send-btn:focus {
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5); /* 按钮聚焦时的边框颜色 */
    }
    .input-container {
        display: flex;
        justify-content: space-between;
      }
      #messageInput {
        flex-grow: 1; /* Take available space */
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 5px;
        margin-right: 5px;
      }
      .send-btn {
        padding: 10px;
        border: none;
        border-radius: 5px;
        background-color: #007bff;
        color: white;
        cursor: pointer;
        transition: background-color 0.3s;
      }
      .send-btn:hover {
        background-color: #0056b3;
      }
